Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

core/datastore/src/commonMain/kotlin/org/meshtastic/core/datastore/serializer/LocalConfigSerializer.kt bd2863243bab6eb213401d949839a2bc74dde7e2 (bd286324) Text, 1.55 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.datastore.serializer

Tff7b72import T7ee787androidx.datastore.core.CorruptionException
Tff7b72import T7ee787androidx.datastore.core.okio.OkioSerializer
Tff7b72import T7ee787okio.BufferedSink
Tff7b72import T7ee787okio.BufferedSource
Tff7b72import T7ee787okio.IOException
Tff7b72import T7ee787org.meshtastic.proto.LocalConfig

T8b949e/** Serializer for the [LocalConfig] object defined in localonly.proto. */
Tff7b72object T56d364LocalConfigSerializer Tb4b4b4: Te6edf3OkioSerializerTff7b72<Te6edf3LocalConfigTff7b72> Tb4b4b4{
Tff7b72override Tff7b72val Te6edf3defaultValueTb4b4b4: Te6edf3LocalConfig Tff7b72= Te6edf3LocalConfigTb4b4b4(Tb4b4b4)

Tff7b72override Tff7b72suspend Tff7b72fun Td2a8ffreadFromTb4b4b4(Te6edf3sourceTb4b4b4: Te6edf3BufferedSourceTb4b4b4)Tb4b4b4: Te6edf3LocalConfig Tb4b4b4{
Tff7b72try Tb4b4b4{
Tff7b72return Te6edf3LocalConfigTb4b4b4.Te6edf3ADAPTERTb4b4b4.Te6edf3decodeTb4b4b4(Te6edf3sourceTb4b4b4)
Tb4b4b4} Tff7b72catch Tb4b4b4(Te6edf3exceptionTb4b4b4: Te6edf3IOExceptionTb4b4b4) Tb4b4b4{
Tff7b72throw Te6edf3CorruptionExceptionTb4b4b4(Ta5d6ff"Ta5d6ffCannot read proto.Ta5d6ff"Tb4b4b4, Te6edf3exceptionTb4b4b4)
Tb4b4b4}
Tb4b4b4}

Tff7b72override Tff7b72suspend Tff7b72fun Td2a8ffwriteToTb4b4b4(Te6edf3tTb4b4b4: Te6edf3LocalConfigTb4b4b4, Te6edf3sinkTb4b4b4: Te6edf3BufferedSinkTb4b4b4) Tb4b4b4{
Te6edf3LocalConfigTb4b4b4.Te6edf3ADAPTERTb4b4b4.Te6edf3encodeTb4b4b4(Te6edf3sinkTb4b4b4, Te6edf3tTb4b4b4)
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.0 - Generated in 0.04s